package com.example.demo.bean.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/*
 * @Author:大力王
 * @Date:2024/3/31-31-17:41
 * 开始了
 */
@Data
public class RegisterByPhoneVO2 {
    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号必须是11位中国手机号")
    @ApiModelProperty(value = "手机号",required = true)
    private String phone;

    @NotNull(message = "密码不能为空")
    @Length(min = 6,max = 11,message = "密码必须在6-11位")
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$", message = "密码必须包含大小写字母和数字")
    @ApiModelProperty(value = "密码",required = true)
    private String password;

    @NotNull(message = "昵称不能为空")
    @Length(min = 1,max = 13,message = "昵称必须在1-13位")
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;

//    @NotNull(message = "验证码不能为空")
//    @ApiModelProperty(value = "验证码",required = true)
//    private String code;
}
